import request from '@/utils/request'

// 查询住客用电列表
export function listPower(query) {
  return request({
    url: '/device/power/list',
    method: 'get',
    params: query
  })
}

// 查询住客用电详细
export function getPower(tenantPowerId) {
  return request({
    url: '/device/power/' + tenantPowerId,
    method: 'get'
  })
}

// 新增住客用电
export function addPower(data) {
  return request({
    url: '/device/power',
    method: 'post',
    data: data
  })
}

// 修改住客用电
export function updatePower(data) {
  return request({
    url: '/device/power',
    method: 'put',
    data: data
  })
}

// 删除住客用电
export function delPower(tenantPowerId) {
  return request({
    url: '/device/power/' + tenantPowerId,
    method: 'delete'
  })
}
